import { postAction } from '../request'

export interface IApi {
    URL_USERLIST: string;
    URL_USERUPDATE: string;
    URL_TASKLIST: string;
    URL_QUERYAPILIST: string;
    URL_APIADD: string;
    URL_APILIST: string;
    URL_APIUPDATE: string;
    URL_APIDEL: string;
    URL_PROGRESSLIST: string;
    URL_PROGRESSADD: string;
    URL_PROGRESSUPDATE: string;
    URL_PROGRESSDEL: string;
    URL_FILERESOURECE: string;
    URL_EMAILLIST: string;
    progressDetail: BaseResponseFn;
    userDetail: BaseResponseFn;
    getUserFunc: BaseResponseFn;
    getPanelData: BaseResponseFn;
    systemSet: BaseResponseFn;
    getSystem: BaseResponseFn;
    sendEmail: BaseResponseFn;
    getEmailTemplate: BaseResponseFn;
  }

// 获取用户列表
export const URL_USERLIST = '/note/admin-user-list'

// 获取用户信息
export const URL_USERUPDATE = '/note/admin-user-update'

// 获取任务列表
export const URL_TASKLIST = '/note/task-list'

// 获取API请求列表
export const URL_QUERYAPILIST = '/note/query-api-list'

// 新增api
export const URL_APIADD = '/note/api-add'

// api列表
export const URL_APILIST = '/note/api-list'

// 更新api权限
export const URL_APIUPDATE = '/note/api-update'

// 删除api
export const URL_APIDEL = '/note/api-del'

// 获取开发列表
export const URL_PROGRESSLIST = '/note/progress-list'

// 新增开发任务
export const URL_PROGRESSADD = '/note/progress-add'

// 更新开发任务
export const URL_PROGRESSUPDATE = '/note/progress-update'

// 移除开发任务
export const URL_PROGRESSDEL = '/note/progress-del'

// 获取系统上传资源
export const URL_FILERESOURECE = '/note/file-list'
// 获取系统上传资源
export const URL_EMAILLIST = '/note/email-list'

// 获取开发任务详情
const URL_PROGRESSDETAIL = '/note/progress-detail'
export const progressDetail = (params: any) => {
  return postAction(URL_PROGRESSDETAIL, params)
}

// 获取指定职能用户
const URL_getUserFunc = '/note/user-func'
export const getUserFunc = (params: any) => {
  return postAction(URL_getUserFunc, params)
}

// 获取面板数据
const URL_getPanel = '/note/panel-data'
export const getPanelData = (params: any) => {
  return postAction(URL_getPanel, params)
}

const URL_USERDETAIL = '/note/user-detail'
export const userDetail = (params: any) => {
  return postAction(URL_USERDETAIL, params)
}

// 更新系统设置
const URL_SYSTEMSET = '/note/system-set'
export const systemSet = (params: any) => {
  return postAction(URL_SYSTEMSET, params)
}

// 获取系统设置
const URL_GETSYSTEMSET = '/note/getSystem'
export const getSystem = (params: any) => {
  return postAction(URL_GETSYSTEMSET, params)
}

// 获取系统设置
const URL_EMAILADD = '/note/email-add'
export const sendEmail = (params: any) => {
  return postAction(URL_EMAILADD, params)
}

// 获取邮件模版
const URL_TEMPLATE = '/note/email-template-list'
export const getEmailTemplate = (params: any) => {
  return postAction(URL_TEMPLATE, params)
}

// 删除邮件
const URL_DELEMAIL = '/note/email-del'
export const delEmail = (params: any) => {
  return postAction(URL_DELEMAIL, params)
}

